<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1{
   width:195px;
}
.select_width{
   width:130px;
}
</style>
<x:parse xml="${param.xmlstr}" var="xmlData" />

<table class="t_css" width="100%" border="0" cellpadding="0" id="basicInfo"
	cellspacing="1">
	<tr>
		<td   colspan="4" class="t_bar2">基本信息</td>
		
	</tr>
	<tr>
		<td   align="right"><span class="color_red">*</span>项目名称：</td>
		<td  colspan="3">
			<input id="zh_title" name="proposal/zh_title" label="项目名称" type="text" required class="input_css required maxlength:100"  style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title" />"/> 
		</td>
	</tr>
	<tr>
		<td width="18%" align="right"><span class="color_red">*</span>项目实施地点：</td>
		<td colspan="3"><input name="proposal/address" label="项目实施地点"
			type="text" required class="input_css required maxlength:100" style="width: 725px;
			maxlength="100"
			value="<x:out select="$xmlData/data/proposal/address" />" /></td>
	</tr>
	<tr>
		<td align="right"><span class="color_red">*</span>研发形式：</td>
		<td nowrap valign="middle">
		<label> <input type="radio" class="do " id="research_01"	style="vertical-align: middle;" name="research" label="独立研发 "
				value="01" /><span style="vertical-align: middle;">独立研发 </span></label> 
				<label><input type="radio" class="do " id="research_02" style="vertical-align: middle;" name="research" label="合作研发"
				value="02" /><span style="vertical-align: middle;">合作研发</span>
		</label> <label> <input type="radio" class="do " id="research_03" style="vertical-align: middle;" name="research" label="引进消化吸收研发"
				value="03" /><span style="vertical-align: middle;">引进消化吸收研发</span></label> 
		<input type="hidden" name="proposal/research_value" id="research_value" class="required" value="<x:out select="$xmlData/data/proposal/research_value" />" label="研发形式" /> 
		<input type="hidden" name="proposal/research_name" id="research_name" value="<x:out select="$xmlData/data/proposal/research_name" />" label="研发形式" /></td>
		<td align="right" width="18%"><span class="color_red">*</span>指南代码：</td>
		<td nowrap  valign="middle"  width="27%">
		<input name="proposal/guide_code" id="guide_code" value="<x:out select="$xmlData/data/proposal/guide_code" />" class="required" maxlength="20"
			label="指南代码" />
		</td>
	</tr>
	<tr>
		<td  align="right" nowrap width="18%"><span class="color_red">*</span>项目开始时间：</td>
		<td width="42%">
			<c:set var="start_date"><x:out select="$xmlData/data/proposal/start_date" /></c:set>
			<cpt:date id="start_date" name="proposal/start_date" value="${start_date}" className=" required date" label="项目开始时间"></cpt:date> 
		</td>
		<td  align="right" nowrap  width="12%"><span class="color_red">*</span>项目结束时间：</td>
		<td  width="28%">
			<c:set var="end_date"><x:out select="$xmlData/data/proposal/end_date" /></c:set>
			<cpt:date id="end_date" name="proposal/end_date" value="${end_date}" className=" required date dateCompareBeforeE:start_date:end_date" label="项目结束时间"></cpt:date> 
		</td>
	</tr>
	

	<tr>
		<td  align="right" nowrap><span class="color_red">*</span>农业科技中所属技术领域：</td>
		<td nowrap colspan="3">
			<c:set var="technology"><x:out select="$xmlData/data/proposal/technology_value" /></c:set>
			<label><input type="radio" class="do"  style="vertical-align: middle;" name="technology" label="农业优良品种培育" value="01" /><span style="vertical-align: middle;">农业优良品种培育</span></label>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
			<label> <input type="radio" class="do"  style="vertical-align: middle;" name="technology" label="生物农药技术" value="02" /><span style="vertical-align: middle;">生物农药技术</span></label> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
			<label> <input type="radio" class="do"  style="vertical-align: middle;" name="technology" label="生物肥料技术" value="03" /><span style="vertical-align: middle;">生物肥料技术</span></label>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
			<label> <input type="radio" class="do"  style="vertical-align: middle;" name="technology" label="病虫害防治技术" value="04" /><span style="vertical-align: middle;">病虫害防治技术</span></label>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
			<label> <input type="radio" class="do"  style="vertical-align: middle;" name="technology" label="生态高效养殖技术" value="05" /><span style="vertical-align: middle;">生态高效养殖技术</span></label><br/>
			<label> <input type="radio" class="do"  style="vertical-align: middle;" name="technology" label="农产品精深加工技术" value="06" /><span style="vertical-align: middle;">农产品精深加工技术</span></label>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
			<label> <input type="radio" class="do"  style="vertical-align: middle;" name="technology" label="农业废弃物资源化利用" value="07" /><span style="vertical-align: middle;">农业废弃物资源化利用</span></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<label> <input type="radio" class="do"  style="vertical-align: middle;" name="technology" label="其他" value="11" /><span style="vertical-align: middle;">其他</span></label>
			<input type="hidden" id="technology_value" name="proposal/technology_value" class="required" value="${technology}" label="农业科技中所属技术领域">
			<input type="hidden" name="proposal/technology_name" value="<x:out select="$xmlData/data/proposal/technology_name" />">
		</td>
	</tr>
		<tr>
		<td align="right" width="20%"><span class="color_red">*</span>省级以上农业龙头企业：</td>
		<td nowrap valign="middle"  >
		<label> <input type="radio" class="do " id="card_regist_01" style="vertical-align: middle;" name="card_regist" label="是"
				value="01" /><span style="vertical-align: middle;">是</span></label> 
				<label><input type="radio" class="do " id="card_regist_02" style="vertical-align: middle;" name="card_regist" label="否"
				value="02" /><span style="vertical-align: middle;">否</span>
		</label>
		<input type="hidden" name="proposal/card_regist_value" id="card_regist_value"
			class="required" value="<x:out select="$xmlData/data/proposal/card_regist_value" />"
			label="省级以上农业龙头企业" /> <input type="hidden" name="proposal/card_regist_name"
			id="card_regist_name"
			value="<x:out select="$xmlData/data/proposal/card_regist_name" />"
			label="省级以上农业龙头企业" /></td>
		<td align="right" width="20%"><span class="color_red">*</span>农业科技型企业：</td>
		<td nowrap valign="middle"  >
		<label> <input type="radio" class="do " id="org_type_01" style="vertical-align: middle;" name="org_type" label="是"
				value="01" /><span style="vertical-align: middle;">是</span></label> 
				<label><input type="radio" class="do " id="org_type_02" style="vertical-align: middle;" name="org_type" label="否"
				value="02" /><span style="vertical-align: middle;">否</span>
		</label>
		<input type="hidden" name="proposal/org_type_value" id="org_type_value"
			class="required" value="<x:out select="$xmlData/data/proposal/org_type_value" />"
			label="农业科技型企业" /> <input type="hidden" name="proposal/org_type_name"
			id="org_type_name" value="<x:out select="$xmlData/data/proposal/org_type_name" />"/></td>
	</tr>
	
	<tr>
	 <td  align="right" nowrap><span class="color_red">*</span>申报日期：</td>
	<td colspan="3">
		<c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
		<cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date}" className=" required date" label="申报日期"></cpt:date> 
	</td>
	</tr>
	</table>
	<br/>
	<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="basicInfo2">
	<tr>
		<td   colspan="4" class="t_bar2">申报项目资金情况</td>
	</tr>
	
	<tr>
		<td align="right">项目计划投资总额（万元）：</td>
		<td colspan="1"><input name="proposal/investment_budget" id="investment_budget"
			 label="项目计划投资总额" type="text" class="input_css gray valueCompare:finsh_budget:investment_budget" disabled
			style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)"
			value="<x:out select="$xmlData/data/proposal/investment_budget" />" /></td>
		<td align="right">其中：已完成投资（万元）：</td>
		<td><input name="proposal/finsh_budget" id="finsh_budget"
			 label="已完成投资" type="text" 
			class="input_css gray" disabled  style="text-align: right"
			onfocus="InitInput.setNumber(this,9,4,2)"
			value="<x:out select="$xmlData/data/proposal/finsh_budget" />" /></td>
	</tr>
	<tr>
		<td align="right">计划新增投资（万元）：</td>
		    <td >
		    <input  name="proposal/plan_add_fund" id="plan_add_fund" class="input_css gray" disabled label="计划新增投资" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" value="<x:out select="$xmlData/data/proposal/plan_add_fund" />"/> 
		    </td>
		<td align="right">申请金额（万元）：</td>
	    <td >
	    <input  name="proposal/sqje" id="sqje" class="input_css gray" disabled label="申请金额" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" value="<x:out select="$xmlData/data/proposal/sqje" />"/> 
	    </td>
	</tr>
	
	<tr>
		<td  align="right" width="20%" >项目类别：</td>
		<td  width="30%"><x:out select="$xmlData/data/proposal/sub_grant_name" /></td> 
		<td  align="right"  width="20%" >项目核准或备案文号：</td>
		<td ><span  name="proposal/project_approval">无</span>
		</td>
	</tr>
	
	<tr>
	<td  align="right">支持方式：</td>
		<td  >
			<span name="proposal/sponsor_category"><x:out select="$xmlData/data/proposal/sponsor_category" /></span> 
		</td>
		
		<td  align="right">资金级次：</td>
		<td>
		<span  name="proposal/fund_level">市级</span>
		</td>
	</tr>
	<tr>
	<td  align="right" nowrap>归口管理部门：</td>
		<td  ><span name="proposal/org_name">无锡市科学技术局</span> </td>
	    <td  align="right">管理类别：</td>
		<td>
		<span name="proposal/manage_category"><x:out select="$xmlData/data/proposal/manage_category" /></span>
		</td>
	</tr>
	<tr>
		<td align="right" nowrap><span class="color_red">*</span>项目所属产业：</td>
		<td nowrap colspan="3"><c:set var="industry">
				<x:out select="$xmlData/data/proposal/industry_value" />
			</c:set> <cpt:checkbox key="industry" name="industry" repeatColumn="5"
				style="border: 0px; padding: 0px; margin: 0px;float:left;"></cpt:checkbox>
			<input type="hidden" id="industry_value"
			name="proposal/industry_value" class="required" value="${industry}"
			label="项目所属产业"> <input type="hidden"
			name="proposal/industry_name"
			value="<x:out select="$xmlData/data/proposal/industry_name" />">
		</td>
	</tr>
	<tr>
	    <td  align="right">功能分类：</td>
		<td  colspan="3">
		<span name="proposal/grant_function"><x:out select="$xmlData/data/proposal/grant_function"/></span>
		</td>
	</tr>
	</table>
	<br/>
	<table  width="100%" border="0" cellpadding="0" cellspacing="1">
	<tr>
		<td    class="t_bar2">申请资助依据条款</td>
		
	</tr>
	<tr>
		<td >
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<span name="proposal/policy_foundation"><x:out select="$xmlData/data/proposal/policy_foundation" /></span> 
		</td>
	</tr>
</table>
<br/>
	<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="org1">
	
	<tr>
		<td    class="t_bar2" colspan="4">合作参与单位信息</td>
		
	</tr>
	<tr>
		<td    class="t_bar2" colspan="4">合作单位信息1</td>
		
	</tr>
	<tr>
		<td align="right"><span class="color_red" id="color1" style="display:none">*</span>单位名称：</td>
		<td colspan="3">
		<input  name="proposal/org_name1" label="合作单位信息1-->单位名称" type="text"  class="input_css " onchange="cydw('org1');" style="width: 725px;"  maxlength="100" value="<x:out select="$xmlData/data/proposal/org_name1" />"/>
		</td>
	</tr>
	<tr>
		<td align="right"><span class="color_red" id="color2" style="display:none">*</span>单位地址：</td>
		<td colspan="3">
		<input  name="proposal/address1" label="合作单位信息1-->地址" type="text"  class="input_css " onchange="cydw('org1');" style="width: 725px;"  maxlength="100" value="<x:out select="$xmlData/data/proposal/address1" />"/>
		</td>
	</tr>
	<tr>
	<td width="14%" align="right"><span class="color_red" id="color3" style="display:none">*</span>注册类型：</td>
          <td width="38%" align="left" colspan="1" >
          	<c:set var="nature1">{'id':'<x:out select="$xmlData/data/proposal/nature1_code" />','name':'<x:out select="$xmlData/data/proposal/nature1_name" />'}</c:set>
          	<cpt:tree key="nature_type" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${nature1}"  label="合作单位信息1-->注册类型"
          		id="nature1" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue2"/>
	        <input id="nature1_code" type="hidden" name="proposal/nature1_code" class="" label="合作单位信息1-->注册类型" value="<x:out select="$xmlData/data/proposal/nature1_code" />"/>
            <input id="nature1_name" type="hidden" name="proposal/nature1_name"  value="<x:out select="$xmlData/data/proposal/nature1_name" />"/>
          </td>
	<td align="right"><span class="color_red" id="color4" style="display:none">*</span>组织机构代码：</td>
	<td><input  name="proposal/org_no1" label="合作单位信息1-->组织机构代码" type="text"  class="input_css " onchange="cydw('org1');"  maxlength="20" value="<x:out select="$xmlData/data/proposal/org_no1" />"/></td>
	</tr>
	<tr>
	<td align="right"><span class="color_red" id="color5" style="display:none">*</span>联系人：</td>
	<td><input  name="proposal/lxr_name1" label="合作单位信息1-->联系人姓名" type="text"  class="input_css " onchange="cydw('org1');"  maxlength="20" value="<x:out select="$xmlData/data/proposal/lxr_name1" />"/></td>
	<td align="right"><span class="color_red" id="color6" style="display:none">*</span>电话：</td>
	<td><input  name="proposal/lxr_tel1" label="合作单位信息1-->联系人电话" type="text"  class="input_css " onchange="cydw('org1');"  maxlength="20" value="<x:out select="$xmlData/data/proposal/lxr_tel1" />"/></td>
	</tr>
</table>
<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="org2">
<tr>
		<td    class="t_bar2" colspan="4">合作单位信息2</td>
		
	</tr>
	<tr>
		<td align="right"><span class="color_red" id="color1" style="display:none">*</span>单位名称：</td>
		<td colspan="3">
		<input  name="proposal/org_name2" label="合作单位信息2-->单位名称" type="text" required class="input_css " onchange="cydw('org2');"  style="width: 725px;"  maxlength="100" value="<x:out select="$xmlData/data/proposal/org_name2" />"/>
		</td>
	</tr>
	<tr>
		<td align="right"><span class="color_red" id="color2" style="display:none">*</span>单位地址：</td>
		<td colspan="3">
		<input  name="proposal/address2" label="合作单位信息2-->地址" type="text" required class="input_css " onchange="cydw('org2');" style="width: 725px;"  maxlength="100" value="<x:out select="$xmlData/data/proposal/address2" />"/>
		</td>
	</tr>
	<tr>
	<td width="14%" align="right"><span class="color_red" id="color3" style="display:none">*</span>注册类型：</td>
          <td width="38%" align="left" colspan="1" >
          	<c:set var="nature2">{'id':'<x:out select="$xmlData/data/proposal/nature2_code" />','name':'<x:out select="$xmlData/data/proposal/nature2_name" />'}</c:set>
          	<cpt:tree key="nature_type" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${nature2}" label="合作单位信息2-->注册类型"
          		id="nature2" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue2"/>
	        <input id="nature2_code" type="hidden" name="proposal/nature2_code"  class="" label="合作单位信息2-->注册类型" value="<x:out select="$xmlData/data/proposal/nature2_code" />"/>
            <input id="nature2_name" type="hidden" name="proposal/nature2_name"  value="<x:out select="$xmlData/data/proposal/nature2_name" />"/>
          </td>
	<td align="right"><span class="color_red" id="color4" style="display:none">*</span>组织机构代码：</td>
	<td><input  name="proposal/org_no2" label="合作单位信息2-->组织机构代码" type="text"  class="input_css " onchange="cydw('org2');"  maxlength="20" value="<x:out select="$xmlData/data/proposal/org_no2" />"/></td>
	</tr>
	<tr>
	<td align="right"><span class="color_red" id="color5" style="display:none">*</span>联系人：</td>
	<td><input  name="proposal/lxr_name2" label="合作单位信息2-->联系人姓名" type="text"  class="input_css "  onchange="cydw('org2');" maxlength="20" value="<x:out select="$xmlData/data/proposal/lxr_name2" />"/></td>
	<td align="right"><span class="color_red" id="color6" style="display:none">*</span>电话：</td>
	<td><input  name="proposal/lxr_tel2" label="合作单位信息2-->联系人电话" type="text"  class="input_css " onchange="cydw('org2');"  maxlength="20" value="<x:out select="$xmlData/data/proposal/lxr_tel2" />"/></td>
	</tr>
</table>
<br/>
<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1" id="basicInfo3">
	<tr>
		<td class="t_bar2" colspan="8">人员信息</td>

	</tr>
	<tr>
		<td align="right"><span class="color_red">*</span>项目联系人：</td>
		<td><input name="proposal/contact_psn_cname" label="项目联系人"
			type="text" required class="input_css required" maxlength="100"
			value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />" />
		</td>
		<td align="right"><span class="color_red">*</span>联系电话：</td>
		<td><input name="proposal/contact_psn_tel" label="联系电话"
			type="text" required class="input_css required" maxlength="50"
			value="<x:out select="$xmlData/data/proposal/contact_psn_tel" />" />
		</td>
		<td align="right"><span class="color_red">*</span>联系手机：</td>
		<td><input name="proposal/contact_psn_mobile" label="联系手机"
			type="text" maxlength="11"
			class="input_css required mobile" maxlength="20"
			value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />" />
		</td>
		<td align="right"><span class="color_red">*</span>电子邮箱：</td>
		<td><input name="proposal/contact_psn_email" label="电子邮箱"
			type="text" required class="input_css required email" maxlength="100"
			value="<x:out select="$xmlData/data/proposal/contact_psn_email" />" />
		</td>
	</tr>
	<tr>
		<td  align="right">项目负责人：</td>
		<td>
			<input  name="proposal/fzr_psncode" type="hidden" required class="input_css "   maxlength="20" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/psn_code" />"/> 
		    
		    <span name="proposal/fzr_psnname" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" /></span>
		
		
		</td>
		<td  align="right">联系电话：</td>
		<td  >
		<span name="proposal/fzr_tel" class="person"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" /></span>
		</td>
		<td  align="right">联系手机：</td>
		<td  >
		<span name="proposal/fzr_mobile" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" /></span>
		</td>
		<td  align="right">电子邮箱：</td>
		<td  >
		<span name="proposal/fzr_mail"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" /></span>
		</td>
		
		</tr>


</table>
<script type="text/javascript">
$(function(){
	cydw('org1');
	cydw('org2');
	service($("#service_value").val());
	changeDrugCategory();
	changeDrugApproval('drug_approvals_td');
	changeDeviceCategory();
});

function cydw(id){
	var count =0 ;
	$("#"+id).find("input[type='text']").each(function(){
		if($.trim($(this).val()) != ''){
			count +=1;
		}
	});
	if(count != 0){
		$("#"+id).find("input[type='text']").each(function(){
			$(this).addClass("required");
		});
		$("#"+id).find("span[id^='color']").each(function(){
			$(this).css('display','');
		});
	}else{
		$("#"+id).find("input[type='text']").each(function(){
			$(this).removeClass("required");
	});
		$("#"+id).find("span[id^='color']").each(function(){
			$(this).css('display','none');
		});
	}
}

function changeDrugCategory() {
	var val = $("#drug_category_value").val();
	var classAttr = "input_css";
	if(val == '03') {
		$("#drug_category").attr("style","display:");
		$("#drug_category").attr("class", classAttr+" required");
	} else {
		$("#drug_category").attr("style","display:none");
		$("#drug_category").attr("class", classAttr);
		$("#drug_category").val("");
	}
}

function changeDrugApproval(objId) {
	var val = $("#drug_approvals_value").val();
	$("#"+objId).find("label[id^='label0']").each(function() {
		if(val=='02') {
			$(this).attr("style","display:");
			$("#drug_approvaled_value").addClass("required");
		} else {
			$(this).attr("style","display:none");
			$("#drug_approvaled_value").removeClass("required");
		}
	});
}
function changeDeviceCategory() {
	var val = $("#medicdevice_category_value").val();
	var classAttr = "input_css";
	if(val == '03') {
		$("#medicdevice_category").attr("style","display:");
		$("#medicdevice_category").attr("class", classAttr+" required");
	} else {
		$("#medicdevice_category").attr("style","display:none");
		$("#medicdevice_category").attr("class", classAttr);
		$("#medicdevice_category").val("");
	}
}

function service(num){
	$(":input[id^=service_area_]").addClass("gray");
	$(":input[id^=service_area_]").attr("disabled",true);
	if(num=='01'){
		$(":input[id^=service_area_]").val("");
	}else{
		$("#service_area_"+num).removeClass("gray");
		$("#service_area_"+num).attr("disabled",false);
		$(":input[id^=service_area_]").not("#service_area_"+num).val("");
	}
	
}
function setValue(id){
	if("service_area_02" == id){
		$("#service_name").val($("#"+id).val()+"区");
	}
	if("service_area_03" == id){
		$("#service_name").val($("#"+id).val()+"开发区");
	}
	if("service_area_04" == id){
		$("#service_name").val("其他："+$("#"+id).val());
	}
}

function setPre(){
	var  teach_staff=$("#research_staff").val();
	var technology_staff = $("#technology_staff").val();
    var staff_total=$("#staff_total").val();
    if(staff_total==''){
    	$("#research_staff_pre").val("0.00");
    	$("#technology_staff_pre").val("0.00");
    }else{
    	 $("#research_staff_pre").val(formatVal(teach_staff*100/staff_total));
    	 $("#technology_staff_pre").val(formatVal(technology_staff*100/staff_total));
    }
   
	
}

function setPre1(){
	var  teach_staff=$("#research_num").val();
    var staff_total=$("#staff_total").val();
    if(staff_total==''){
    	$("#proportion").val("0.00");
    }else{
    $("#proportion").val(formatVal(teach_staff*100/staff_total));
    }
}
function initTreeValue2CallBack(){
	cydw('org1');
	cydw('org2');
}

function autoCountFund() {
	 var count3=0;
	 var count2=0;
	$("#tblEuipments tr:gt(1)").each(function() {
		var fund = $(this).children().eq("3").children().val();
		var fund3 = $(this).children().eq("4").children().val();
		if (!$.isNumeric(fund))  fund = "0";
		if (!$.isNumeric(fund3))  fund3 = "0";
		count2 = formatNumberAuto((parseFloat(fund)+parseFloat(count2))+"",9,0,0);
		count3 = formatNumberAuto((parseFloat(fund3)+parseFloat(count3))+"",9,4,2);
	});
	$("#amount_count").val(count2);
	$("#money_count").val(count3);
}

function setEmptyValueForTree(id){
	$("#"+id).val("");
	$("#"+id+"_hideId").val("");
	$("#"+id+"_hideName").val("");
	$("#"+id+"_code").val("");
	$("#"+id+"_value").val("");
	$("#"+id+"_name").val("");
	$("#"+id + ",[name$='/"+id+"_code']" + ",[name$='/"+id+"_name'],[name$='/"+id+"_value']").val("");
	$("#sqdm").val("");
	cydw('org1');
	cydw('org2');
}

</script>

